//
//  TKIMDateHelper.h
//  TKIM
//
//  Created by liupm on 15/10/23.
//  Copyright © 2015年 liupm. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface TKIMDateHelper : NSObject

/**
 *  @Author lpm, 15-10-30 17:10:23
 *
 *  @brief  字串转时间
 *
 *  @param str
 *
 *  @return
 */
+(NSDate *)stringToDate:(NSString *)str withFormatter:(NSString *)formatterStr;

/**
 * Given the reference date and return a pretty date string to show
 *
 * @param refrence the date to refrence
 *
 * @return a pretty date string, like "just now", "1 minute ago", "2 weeks ago", etc
 */
+(NSString *)prettyDateWithReference:(NSDate *)reference;


/**
 *  @Author lpm, 15-10-23 14:10:24
 *
 *  @brief  格式化时间
 *
 *  @param date
 *  @param format
 *
 *  @return
 */
+(NSString *)formatDate:(NSDate *)date withFormat:(NSString *)format;


/**
 *  @Author lpm, 15-10-30 17:10:23
 *
 *  @brief  字串转时间
 *
 *  @param str
 *
 *  @return
 */
+(NSDate *)stringToDate:(NSString *)str;


/**
 *  @Author lpm, 16-12-29 13:12:51
 *
 *  @brief  标准时间日期描述
 *
 *  @param dateStr
 *
 *  @return
 */
+(NSString *)formattedTime:(NSString *)dateStr;



/**
 *  @Author lpm, 16-12-29 13:12:19
 *
 *  @brief  到目标时间 差
 *
 *  @param timeIntervalInMilliSecond
 *
 *  @return 
 */
+ (NSDate *)dateWithTimeIntervalInMilliSecondSince1970:(double)timeIntervalInMilliSecond;


@end
